import java.util.ArrayList;
import java.util.Hashtable;

public class Dealer {

	private Deck deck;
	private Hand hand;
	private Hashtable<Integer, Player> players;
	private int pot;
	private int bb, sb;
	
	public Dealer(int bigBlind, Hashtable<Integer, Player> newPlayers) {
		
		deck = new Deck();
		hand = new Hand();
		players = newPlayers;
		bb = bigBlind;
		sb = bb / 2;
	}

	public void takeBlinds() {

		players.get(0).subtractChips(sb);
		players.get(1).subtractChips(bb);
		pot = bb + sb;
	}

	public void dealCards() {

		for (Player p : players.values()) {
			p.setCards(deck.popCard(), deck.popCard());
		}
	}
	
	public void shuffleDeck(){
		
		deck.shuffle();
	}
	
	
}
